﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace webnew
{
    public partial class quit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                Session.Abandon();
                int type = Request.QueryString["type"] == null ? 0 : Convert.ToInt16(Request.QueryString["type"]);
                Response.Cookies["loginid"].Value = "";
                Response.Cookies["pwd"].Value = "";
                if (type == 0)
                { 
                    string jsStr = "<script type='text/javascript'>window.opener=null;window.open('','_self');window.close();</script>";
                    Response.Write(jsStr);
                }
                else
                {
                    Response.Redirect("~/login.aspx");
                }
            }
        }
    }
}
